<template>
    <view>
        <view class="banner">
            <image class="banner-img" :src="banner.img"></image>
            <view class="banner-title">{{banner.title}}</view>
        </view>
		<view class="content-text">
			<text>{{banner.content}}</text>
		</view>
        <view class="article-meta">
            <text class="article-author">{{banner.author}}</text>
            <text class="article-text">发表于</text>
            <text class="article-time">{{banner.time}}</text>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {}
        },
        onLoad(event) {
            // console.log(event);
            this.banner = JSON.parse(decodeURIComponent(event.detailDate));
			// console.log(this.banner);
            //详情标题
            uni.setNavigationBarTitle({
                title: this.banner.title
            });
        },
        methods: {
        }
    }
</script>
<style>
    .banner {
        height: 360upx;
        overflow: hidden;
        position: relative;
        background-color: #ccc;
    }
    .banner-img {
        width: 100%;
    }
    .banner-title {
        max-height: 84upx;
        overflow: hidden;
        position: absolute;
        left: 30upx;
        bottom: 30upx;
        width: 90%;
        font-size: 32upx;
        font-weight: 400;
        line-height: 42upx;
        color: white;
        z-index: 11;
    }
	.content-text{
	  text-indent: 2em;
	  font-size: 16px;
	  line-height: 1.6;
	  color: #333333;
	  margin-bottom: 10px;
	}
	
	.content-text:first-child {
	  margin-top: 0;
	}
	
	.content-text:last-child {
	  margin-bottom: 0;
	}
</style>